package edu.kit.csl.pisa.training;

/*
This file is part of the PISA Alignment Tool.

Copyright (C) 2013
Karlsruhe Institute of Technology
Cognitive Systems Lab (CSL)
Felix Stahlberg

PISA is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

PISA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with PISA. If not, see <http://www.gnu.org/licenses/>.
*/

import edu.kit.csl.pisa.datatypes.SentencePair;
import edu.kit.csl.pisa.models.AlignmentModel;

/**
 * This class basically addresses the task of finding new good-looking 
 * alignments to try out in the maximization step. It transfers a set
 * of old alignments to a new set. This new set is then used for starting
 * points of maximization algorithms implemented by
 * {@link MaximizationStrategy}s.
 */
abstract public class SuccessorStrategy {
	
	protected AlignmentModel model;
	
	/**
	 * Sole constructor.
	 * 
	 * @param model Alignment model. This may be used to get some parameters
	 * 		from the configuration
	 */
	public SuccessorStrategy(AlignmentModel model) {
		this.model = model;
	}
	
	/**
	 * Find successor alignments for the set of alignments for a sentence pair.
	 * 
	 * @param senPair alignments of this sentence pair serve as possible start 
	 * 			points for finding successors. New successor alignments are
	 * 			stored in this Sentence Pair instance
	 * @throws UnsupportedOperationException if the strategy is not implemented
	 */
	public abstract void findSuccessors(SentencePair senPair)
			throws UnsupportedOperationException;
}
